//kind.js
var app = getApp();
Page({
  data: {
    userInfo: {},
    openid:'',
    mask: '',
    keyword: '',
    session_key:'',
    gps:'重庆',
    ad:['../img/ad.jpg','../img/ad.jpg','../img/ad.jpg'],
    guide: [{ url: '../list/list?type=洗浴汗蒸', src: '../img/K1.png', name: '洗浴汗蒸' }, { url: '../list/list?type=足疗按摩', src: '../img/k2.png', name: '足疗按摩' }, { url: '../list/list?type=KTV影院', src: '../img/k3.png', name: 'KTV影院' }, { url: '../list/list?type=密室逃脱', src: '../img/k4.png', name: '密室逃脱' }, { url: '../list/list?type=电玩游戏VR', src: '../img/k5.png', name: '电玩游戏VR' }, { url: '../list/list?type=运动健身', src: '../img/k6.png', name: '运动健身' }, { url: '../list/list?type=DIY手工坊', src: '../img/k7.png', name: 'DIY手工坊' }, { url: '../list/list?type=网吧网咖', src: '../img/k8.png', name: '网吧网咖' }, { url: '../list/list', src: '../img/k9.png', name: '茶馆' }, { url: '../list/list', src: '../img/k10.png', name: '轰趴馆' }, { url: '../list/list?type=桌游棋牌', src: '../img/k11.png', name: '桌游棋牌' }, { url: '../list/list?type=桌游棋牌', src: '../img/k12.png', name: '真人CS' }, { url: '../list/list', src: '../img/k13.png', name: '演出赛事' }, { url: '../list/list?type=桌游棋牌', src: '../img/k14.png', name: '丽人宠物' }, { url: '../list/list?type=桌游棋牌', src: '../img/k15.png', name: '文化艺术' }, { url: '../list/list?type=桌游棋牌', src: '../img/k16.png', name: '采摘农家' }],
    pro: [{ src: '../img/pro1.jpg', icon: '../img/tuan.jpg', name: '仅售226元！价值312元的4人自助午餐，提供免费WiFi。', now: '226.00', price: '200.00', url: '../pro/pro' }, { src: '../img/pro2.jpg', icon: '../img/pin.jpg', name: '9小时欢唱+酒水套餐', now: '226.00', price: '20.00', url: '../pro/pro' }, { src: '../img/pro3.jpg', icon: '../img/quan.jpg', name: '【2店通用】美联英语', now: '226.00', price: '20.00', url: '../pro/pro' }, { src: '../img/pro4.jpg', icon: '../img/quan.jpg', name: '重庆动物园', now: '226.00', price: '20.00', url: '../pro/pro' }, { src: '../img/pro5.jpg', icon: '../img/pin.jpg', name: '妍姿美睫美甲生活馆', now: '226.00', price: '20.00', url: '../pro/pro' }],
    list: [{ url: '../shop/shop', logo: '../img/ll1.png', name: '阿利与艾德炭烤麻里牛排海鲜自助烤肉（煌华新纪元购', place: '沙坪坝观音桥', distance: '256m', label: '烧烤烤肉', song: '1', quan: '38元抵100元代金券', pin: '青椒肉丝炒饭10元短标', tuan: '4人套餐48.8元, 6人餐228元短标, 4人餐188元（原价264元）短标, 8人餐短标,', mian: '冰柠檬水免费赠饮一杯,  回锅肉炒饭一份短标,   ' }, { url: '../shop/shop', logo: '../img/ll2.png', name: '阿利与艾德炭烤麻里牛排海鲜自助烤肉（煌华新纪元购', place: '沙坪坝观音桥', distance: '256m', label: '烧烤烤肉', song: '0', quan: '38元抵100元代金券'}, { url: '../shop/shop', logo: '../img/ll1.png', name: '阿利与艾德炭烤麻里牛排海鲜自助烤肉（煌华新纪元购', place: '沙坪坝观音桥', distance: '256m', label: '烧烤烤肉', song: '1', quan: '38元抵100元代金券', pin: '青椒肉丝炒饭10元短标', mian: '冰柠檬水免费赠饮一杯,  回锅肉炒饭一份短标,   ' }]
  }, 

  //事件处理函数
  home: function () {
    wx.switchTab({
      url: '../index/index',
    })
  },
  location: function () {
    wx.navigateTo({
      url: '../gps/gps',
    })
  },
  maskshow: function () {
    this.setData({
      mask: 'active'
    })
  },
  maskhide: function () {
    this.setData({
      mask: ''
    })
  },
  toinput: function (e) {
    this.setData({
      keyword: e.detail.value
    })
  },
  serach: function () {
    wx.showToast({
      title: '搜索' + this.data.keyword,
    })
  },
  onLoad: function () {
    var that = this
    //调用应用实例的方法获取全局数据
    app.getUserInfo(function (userInfo) {
      //更新数据
      that.setData({
        userInfo: userInfo
      })
    })
  
 
  },
  onReady:function(){ 	 

  }
})
